package kr.hkit.androidcomplete02.ch16;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;
import android.view.View;

public class TouchOutsideEx extends Activity {
	protected void onCreate(Bundle savedInstanceState) { 
		 super.onCreate(savedInstanceState); 
		 setContentView(R.layout.ch16_dialog); 
		 } 
		 
		 public void mOnClick(View v){ 
		 AlertDialog dialog = new AlertDialog.Builder(this) 
		 .setTitle("알림") 
		 .setMessage("대화상자 바깥을 누르면 닫힙니다.") 
		 .setIcon(R.drawable.androboy) 
		 .create(); 
		 
		 dialog.setCanceledOnTouchOutside(true); 
		 dialog.show(); 
		 } 

}
